home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / wrnsr094 / file_sel.frm < prev    next >
Text File  |  1995-05-08  |  3KB  |  120 lines

  1. VERSION 2.00
  2. Begin Form File_Select 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Select File"
  5.    ClientHeight    =   4995
  6.    ClientLeft      =   1080
  7.    ClientTop       =   1380
  8.    ClientWidth     =   6060
  9.    ControlBox      =   0   'False
  10.    Enabled         =   0   'False
  11.    Height          =   5400
  12.    Left            =   1020
  13.    LinkMode        =   1  'Source
  14.    LinkTopic       =   "Form2"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   4995
  18.    ScaleWidth      =   6060
  19.    Top             =   1035
  20.    Visible         =   0   'False
  21.    Width           =   6180
  22.    Begin FileListBox sel_file 
  23.       Height          =   3345
  24.       Left            =   3360
  25.       TabIndex        =   2
  26.       Top             =   1440
  27.       Width           =   2415
  28.    End
  29.    Begin DirListBox sel_dir 
  30.       BackColor       =   &H00FFFFFF&
  31.       ForeColor       =   &H00000000&
  32.       Height          =   3375
  33.       Left            =   360
  34.       TabIndex        =   1
  35.       Top             =   1440
  36.       Width           =   2535
  37.    End
  38.    Begin CommandButton Cancel_button 
  39.       Caption         =   "Cancel"
  40.       Height          =   495
  41.       Left            =   4200
  42.       TabIndex        =   5
  43.       Top             =   840
  44.       Width           =   735
  45.    End
  46.    Begin CommandButton OK_button 
  47.       Caption         =   "OK"
  48.       Default         =   -1  'True
  49.       Height          =   495
  50.       Left            =   3360
  51.       TabIndex        =   4
  52.       Top             =   840
  53.       Width           =   615
  54.    End
  55.    Begin DriveListBox sel_drive 
  56.       Height          =   315
  57.       Left            =   360
  58.       TabIndex        =   0
  59.       Top             =   840
  60.       Width           =   2655
  61.    End
  62.    Begin TextBox sel_filename 
  63.       Height          =   375
  64.       Left            =   1440
  65.       TabIndex        =   3
  66.       Top             =   240
  67.       Width           =   4335
  68.    End
  69. End
  70. Sub Cancel_button_Click ()
  71.    file_select.enabled = False
  72.    file_select.visible = False
  73.    sel_filename.text = ""
  74. End Sub
  75.  
  76. Sub Form_GotFocus ()
  77.    sel_drive.enabled = True
  78.    Call sel_file_pathchange
  79. End Sub
  80.  
  81. Sub OK_button_Click ()
  82.    file_select.enabled = False
  83.    file_select.visible = False
  84. End Sub
  85.  
  86. Sub sel_dir_Change ()
  87.   sel_file.path = sel_dir.path
  88. End Sub
  89.  
  90. Sub sel_drive_Change ()
  91.    sel_dir.path = CurDir$(sel_drive.drive)
  92. End Sub
  93.  
  94. Sub sel_file_click ()
  95.    If Right$(sel_file.path, 1) = "\" Then
  96.       sel_filename.text = sel_file.path + sel_file.filename
  97.    Else
  98.       sel_filename.text = sel_file.path + "\" + sel_file.filename
  99.    End If
  100. End Sub
  101.  
  102. Sub sel_file_DblClick ()
  103.    Call sel_file_click
  104.    Call OK_button_Click
  105. End Sub
  106.  
  107. Sub sel_file_pathchange ()
  108.    sel_file.pattern = "*.*"
  109.    Call sel_file_patternchange
  110. End Sub
  111.  
  112. Sub sel_file_patternchange ()
  113.    If Right$(sel_file.path, 1) = "\" Then
  114.       sel_filename.text = sel_file.path + sel_file.pattern
  115.    Else
  116.       sel_filename.text = sel_file.path + "\" + sel_file.pattern
  117.    End If
  118. End Sub
  119.  
  120.